Classes in PHP and JSON
November 30, 2009 · 87 views · 0 comments
Nearby In Time
Optimizing Code
November 29, 2009
Harassment and Insults from friendly neighbors
November 30, 2009
Big Coloring Books
November 30, 2009
Occer! Occer! Occer!
November 30, 2009
Classes in PHP and JSON
November 30, 2009
Lewis Moten inSL: Dedric Mauriac
December 1, 2009
Downloading the Metaverse
December 4, 2009
Nano Payments
December 4, 2009
Blame Sculpties on me
December 4, 2009
About
I started looking into classes in PHP and found a great way to encapsulate a lot of logic that I am going to use quite often for my grids. In addition, I found a method in PHP that also converts objects into JavaScript Object Notation (JSON) - json_encode($this). It takes a lot of the manual labor out of the equation. PHP's implementation appears to be a little bit more heavier on the encoding and casts property names to strings. I found one problem where I had to recast integers retrieved from a database so that the JSON would represent them as numbers instead of strings. From Dedric Mauriac via bloghud.com